<?php
class Manageuser extends Controller {

    public $userLog;
    public $users;

    public function __construct() {
        parent::__construct();
        $this->_initalize();
    }

    public function __destruct() {
        parent::__destruct();
    }

    public function index() {
        $this->template('admin/index');
    }

    private function _initalize() {
        if (isset($this->_session['user'])) {
            $this->userLog = $this->_session['user']['info'];
            if ($this->userLog->level != 1) {
                header('Location:index.php?c=login');
            }
        } else {
            header('Location:index.php?c=login');
        }

        $this->model('user');
        $this->user->id = $this->userLog->id;
    }

}

?>
